﻿<Window
	x:Class="NAntMenu.Logger.BuildOutputDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:self="clr-namespace:NAntMenu.Logger"
	Title="Build Output"
    ResizeMode="CanResizeWithGrip"
    Topmost="True"
    WindowStartupLocation="CenterScreen"
    WindowStyle="ThreeDBorderWindow"
	Height="300"
    Width="600">
	<Window.Resources>
		<self:LevelToImageConverter x:Key="LevelToImageConverter" />
	</Window.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="30" />
			<RowDefinition Height="*" />
			<RowDefinition Height="25" />
		</Grid.RowDefinitions>
		<StackPanel Orientation="Horizontal" Grid.Row="0">
			<ToggleButton x:Name="btnErrors" ClickMode="Press" MinWidth="90" Margin="2" Checked="btnErrors_Checked" Unchecked="btnErrors_Checked">
				<StackPanel Orientation="Horizontal">
					<Image Source="/NAntMenu.Logger;component/images/Error.png" Margin="0,0,5,0" />
					<TextBlock x:Name="tbErrors">0 Errors</TextBlock>
				</StackPanel>
			</ToggleButton>
			<ToggleButton x:Name="btnWarnings" ClickMode="Press" MinWidth="90" Margin="2" Checked="btnWarnings_Checked" Unchecked="btnWarnings_Checked">
				<StackPanel Orientation="Horizontal">
					<Image Source="/NAntMenu.Logger;component/images/Warning.png" Margin="0,0,5,0" />
					<TextBlock x:Name="tbWarnings">0 Warnings</TextBlock>
				</StackPanel>
			</ToggleButton>
			<ToggleButton x:Name="btnMessages" ClickMode="Press" MinWidth="90" Margin="2" Checked="btnMessages_Checked" Unchecked="btnMessages_Checked">
				<StackPanel Orientation="Horizontal">
					<Image Source="/NAntMenu.Logger;component/images/Info.png" Margin="0,0,5,0" />
					<TextBlock x:Name="tbMessages">0 Messages</TextBlock>
				</StackPanel>
			</ToggleButton>
		</StackPanel>
		<DataGrid Grid.Row="1" x:Name="dgOutputMessages" AutoGenerateColumns="False" IsReadOnly="True">
			<DataGrid.Columns>
				<DataGridTemplateColumn>
					<DataGridTemplateColumn.CellTemplate>
						<DataTemplate>
							<ContentControl Content="{Binding Level, Converter={StaticResource LevelToImageConverter}}" />
						</DataTemplate>
					</DataGridTemplateColumn.CellTemplate>
				</DataGridTemplateColumn>
				<DataGridTextColumn Header="Description" Binding="{Binding Description}" />
			</DataGrid.Columns>
			<DataGrid.RowStyle>
				<Style TargetType="{x:Type DataGridRow}">
					<EventSetter Event="Control.RequestBringIntoView" Handler="dgOutputMessages_RequestBringIntoView"  />
				</Style>
			</DataGrid.RowStyle>

		</DataGrid>
		<StatusBar Grid.Row="2">
			<StatusBarItem>
				<TextBlock x:Name="tbStatusBar" Text="Ready" />
			</StatusBarItem>
		</StatusBar>
	</Grid>
</Window>
